<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">

        <p>msg:{{msg}}</p>
        <p>msg:{{msg1}}</p>
        <input type="button" value="shi" @click="fn">
    </div>
</body>
<script src="./vue.js"></script>
<script>

//定义一个 混入对象
let m1 = {
    
    data(){
        return  {
            msg1:"hi"
        }
       
    } ,
    methods:{
        sort(){
            console.log("sort")
        }
        }
}




    let vm = new Vue({
        mixins:[m1],
        el:"#app",
        data:{
            arr:[1,3,5,5,1,5,],
            msg:"hello",
        },
        methods:{
            fn(){
                this.sort()
            },
            sort(){
                console.log("vue Li de sort")
            }
        }
    })
</script>
</html>